package com.nami.dispatcher.domain.repository;


import com.nami.im.network.model.enums.DownMsgErrorCode;
import com.nami.im.network.model.packet.v2.Packet;

public interface PacketFactory {

    /**
     * 组装packet
     *
     * @param cmd
     * @param body
     * @return
     */
    Packet newPacket(Byte cmd, Object body);

    /**
     * original packet
     *
     * @return
     */
    Packet newPacket();

    /**
     * assembly
     *
     * @param cmd
     * @param errorCode
     * @param body
     * @return
     */
    Packet newDownmsgErrorRespPacket(Byte cmd, DownMsgErrorCode errorCode, Object body);

    /**
     * @param cmd
     * @param body
     * @return
     */
    Packet newDownmsgSuccPacket(Byte cmd, Object body);

}
